package com.howie.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.howie.common.utils.PageUtils;
import com.howie.gulimall.product.entity.AttrEntity;
import com.howie.gulimall.product.vo.AttrResponseVo;
import com.howie.gulimall.product.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author laizhenghua
 * @email 3299447929@qq.com
 * @date 2020-12-06 19:27:40
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attrVo);

    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId, String attrType);

    AttrResponseVo getAttrInfo(Long attrId);

    void updateAttr(AttrVo attrVo);

    List<AttrEntity> getRelationAttr(Long attrgroupId);

    PageUtils getNoRelationAttr(Long attrgroupId, Map<String, Object> params);
    /**
     * @description: 在指定所有属性集合里，过滤出可检索属性的id(attrType=1)
     * @author: laizhenghua
     * @date: 2021/1/22 16:06
     * @param: attrIds
     * @return: java.util.List<java.lang.Long>
     */
    List<Long> getEnableSearchAttrIds(List<Long> attrIds);
}

